/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufc.quixada.adrs.dao;

import br.ufc.quixada.adrs.dao.config.PostGresMapConfig;
import br.ufc.quixada.adrs.model.QuestionarioQualitativo;
import java.sql.SQLException;

/**
 *
 * @author Caio
 */
public class QuestionarioQualitativoDAO {

    public QuestionarioQualitativo getByVisitaId(Long id) throws SQLException {
        return (QuestionarioQualitativo) PostGresMapConfig.getSqlMapClient().queryForObject("getQuestionarioQualitativoByVisitaId", id);
    }

    private Long proxId() throws SQLException {
        Long l = (Long) PostGresMapConfig.getSqlMapClient().queryForObject("getMaxQuestionarioQualitativoId");
        if (l == null) {
            l = 0L;
        }
        return l + 1;
    }
}
